			
			<cfquery name="getallfields" datasource="#client.global_dsn#">
				select columnname,columntype,physicalwidth
				from grgbosetablefields
				where tablename = '#thetable#' and columnname <> 'personnelidno'
			</cfquery>
			<!---
			<cfset getentry = querynew(#valuelist(getallfields.columnname)#)>
			<cfset a = queryaddrow(getentry)>
			<cfloop query="getbrowsefields">
				<cfset b = querysetcell(getentry,columnname,evaluate("form.edt#columnname#"))>
			</cfloop>--->
			<cfquery name="getentry" datasource="#client.company_dsn#" result="theresult">
				declare @tempgetentry table(personnelidno varchar(30),
				<cfloop query="getallfields">
				#columnname# <cfswitch expression="#columntype#">
								<cfcase value="ftfloat">
									float
								</cfcase>
								<cfcase value="ftinteger">
									integer
								</cfcase>				
								<cfcase value="ftdatetime">
									datetime
								</cfcase>	
								<cfdefaultcase>
									varchar(#physicalwidth#)
								</cfdefaultcase>																		
							</cfswitch><cfif currentrow neq recordcount>,</cfif>
				</cfloop>);
				Insert into @tempgetentry(#valuelist(getallfields.columnname)#,personnelidno)
				values(<cfloop query="getallfields">
							<cfif structkeyexists(form,"edt#columnname#")>
								<cfswitch expression="#columntype#">
									<cfcase value="ftfloat">
										<cfqueryparam value="#evaluate("form.edt#columnname#")#" cfsqltype="cf_sql_float">
									</cfcase>
									<cfcase value="ftinteger">
										<cfqueryparam value="#evaluate("form.edt#columnname#")#" cfsqltype="cf_sql_integer">
									</cfcase>				
									<cfcase value="ftdatetime">
										<cfqueryparam value="#evaluate("form.edt#columnname#")#" cfsqltype="cf_sql_timestamp">
									</cfcase>	
									<cfdefaultcase>
										<cfqueryparam value="#evaluate("form.edt#columnname#")#" cfsqltype="cf_sql_varchar">
									</cfdefaultcase>																		
								</cfswitch>							
							<cfelse>
								<cfswitch expression="#columntype#">
									<cfcase value="ftfloat">
										<cfqueryparam value="" null="yes" cfsqltype="cf_sql_float">
									</cfcase>
									<cfcase value="ftinteger">
										<cfqueryparam value="" null="yes" cfsqltype="cf_sql_integer">
									</cfcase>				
									<cfcase value="ftdatetime">
										<cfqueryparam value="" null="yes" cfsqltype="cf_sql_timestamp">
									</cfcase>	
									<cfdefaultcase>
										<cfqueryparam value="" null="yes" cfsqltype="cf_sql_varchar">
									</cfdefaultcase>																		
								</cfswitch>				
							</cfif>
							,
						</cfloop><cfqueryparam value="#PID#" cfsqltype="cf_sql_varchar">);
				select *
				from @tempgetentry
			</cfquery>
			<cfset lpreprocessvalidated = "No">
			<cfset lPreProcessShowMsg = "Yes">
			<cfset url.docnumber = getentry.docnumber>
			<cfset sedtrmess = "">
			<cfsilent>
			<cfinclude template="../../eforms/pre_activities/#thepreprocess#">
			</cfsilent>